<?php

namespace IUTINFO\ActionsComBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use DateTime;

/**
 * Forum
 *
 * @ORM\Table(schema="db_adc")
 * @ORM\Entity(repositoryClass="IUTINFO\ActionsComBundle\Entity\ForumRepository")
 */
class Forum
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;
    
    /**
     * @var integer
     * 
     * @ORM\ManyToOne(targetEntity="IUTINFO\ActionsComBundle\Entity\ActionDeCommunication")
     */
    private $action;

    /**
     * @var string
     *
     * @ORM\Column(name="titre", type="string", length=50)
     */
    private $titre;

    /**
     * @var string
     *
     * @ORM\Column(name="commentaire", type="string", length=2500)
     */
    private $commentaire;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="date", type="date", options={"default" = "0000-00-00"})
     */
    private $date;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="dateLimiteInscription", type="date", options={"default" = "0000-00-00"})
     */
    private $dateLimiteInscription;

    /**
     * @var string
     *
     * @ORM\Column(name="lieu", type="string", length=50)
     */
    private $lieu;

    /**
     * @var string
     *
     * @ORM\Column(name="NomLycee", type="string", length=50, nullable=false)
     */
    private $nomLycee;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="heureDebut", type="time", options={"default" = "00:00:00"})
     */
    private $heureDebut;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="heureFin", type="time", options={"default" = "00:00:00"})
     */
    private $heureFin;

    /**
     * @var integer
     *
     * @ORM\Column(name="noteMax", type="integer", options={"default" = "0.05"})
     */
    private $noteMax;
    
    /**
     * @var integer
     *
     * @ORM\Column(name="noteEtu1", type="integer",  nullable=true)
     */
    private $noteEtu1;
    
    /**
     * @var integer
     *
     * @ORM\Column(name="noteEtu2", type="integer", nullable=true)
     */
    private $noteEtu2;
    
     /**
     * @var integer
     *
     * @ORM\ManyToOne(targetEntity="IUTINFO\ActionsComBundle\Entity\Etat")
     */
    private $etat;
    
    /**
     * @var string
     *
     * @ORM\ManyToOne(targetEntity="IUTINFO\ActionsComBundle\Entity\Enseignant")
     */
    private $enseignant;


    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set titre
     *
     * @param string $titre
     * @return Forum
     */
    public function setTitre($titre)
    {
        $this->titre = $titre;

        return $this;
    }

    /**
     * Get titre
     *
     * @return string 
     */
    public function getTitre()
    {
        return $this->titre;
    }

    /**
     * Set commentaire
     *
     * @param string $commentaire
     * @return Forum
     */
    public function setCommentaire($commentaire)
    {
        $this->commentaire = $commentaire;

        return $this;
    }

    /**
     * Get commentaire
     *
     * @return string 
     */
    public function getCommentaire()
    {
        return $this->commentaire;
    }

    /**
     * Set date
     *
     * @param \DateTime $date
     * @return Forum
     */
    public function setDate($date)
    {
        $this->date = $date;

        return $this;
    }

    /**
     * Get date
     *
     * @return \DateTime 
     */
    public function getDate()
    {
        $d = new DateTime("0000-00-00");
    	
    	if($this->date == $d)
    		return new DateTime("1970-01-01");
    	 
        return $this->date;
    }

    /**
     * Set dateLimiteInscription
     *
     * @param \DateTime $dateLimiteInscription
     * @return Forum
     */
    public function setDateLimiteInscription($dateLimiteInscription)
    {
        $this->dateLimiteInscription = $dateLimiteInscription;

        return $this;
    }

    /**
     * Get dateLimiteInscription
     *
     * @return \DateTime 
     */
    public function getDateLimiteInscription()
    {
        $d = new DateTime("0000-00-00");
    	
    	if($this->dateLimiteInscription == $d)
    		return new DateTime("1970-01-01");
    	 
        return $this->dateLimiteInscription;
    }

    /**
     * Set lieu
     *
     * @param string $lieu
     * @return Forum
     */
    public function setLieu($lieu)
    {
        $this->lieu = $lieu;

        return $this;
    }

    /**
     * Get lieu
     *
     * @return string 
     */
    public function getLieu()
    {
        return $this->lieu;
    }

    /**
     * Set nomLycee
     *
     * @param string $nomLycee
     * @return Forum
     */
    public function setNomLycee($nomLycee)
    {
        $this->nomLycee = $nomLycee;

        return $this;
    }

    /**
     * Get nomLycee
     *
     * @return string 
     */
    public function getNomLycee()
    {
        return $this->nomLycee;
    }

    /**
     * Set heureDebut
     *
     * @param \DateTime $heureDebut
     * @return Forum
     */
    public function setHeureDebut($heureDebut)
    {
        $this->heureDebut = $heureDebut;

        return $this;
    }

    /**
     * Get heureDebut
     *
     * @return \DateTime 
     */
    public function getHeureDebut()
    {
        return $this->heureDebut;
    }

    /**
     * Set heureFin
     *
     * @param \DateTime $heureFin
     * @return Forum
     */
    public function setHeureFin($heureFin)
    {
        $this->heureFin = $heureFin;

        return $this;
    }

    /**
     * Get heureFin
     *
     * @return \DateTime 
     */
    public function getHeureFin()
    {
        return $this->heureFin;
    }

    /**
     * Set noteMax
     *
     * @param integer $noteMax
     * @return Forum
     */
    public function setNoteMax($noteMax)
    {
        $this->noteMax = $noteMax;

        return $this;
    }

    /**
     * Get noteMax
     *
     * @return integer 
     */
    public function getNoteMax()
    {
        return $this->noteMax;
    }

    /**
     * Set action
     *
     * @param \IUTINFO\ActionsComBundle\Entity\ActionDeCommunication $action
     * @return Forum
     */
    public function setAction(\IUTINFO\ActionsComBundle\Entity\ActionDeCommunication $action = null)
    {
        $this->action = $action;

        return $this;
    }

    /**
     * Get action
     *
     * @return \IUTINFO\ActionsComBundle\Entity\ActionDeCommunication 
     */
    public function getAction()
    {
        return $this->action;
    }

    /**
     * Set etat
     *
     * @param \IUTINFO\ActionsComBundle\Entity\Etat $etat
     * @return Forum
     */
    public function setEtat(\IUTINFO\ActionsComBundle\Entity\Etat $etat = null)
    {
        $this->etat = $etat;

        return $this;
    }

    /**
     * Get etat
     *
     * @return \IUTINFO\ActionsComBundle\Entity\Etat 
     */
    public function getEtat()
    {
        return $this->etat;
    }

    /**
     * Set noteEtu1
     *
     * @param integer $noteEtu1
     * @return Forum
     */
    public function setNoteEtu1($noteEtu1)
    {
        $this->noteEtu1 = $noteEtu1;

        return $this;
    }

    /**
     * Get noteEtu1
     *
     * @return integer 
     */
    public function getNoteEtu1()
    {
        return $this->noteEtu1;
    }

    /**
     * Set noteEtu2
     *
     * @param integer $noteEtu2
     * @return Forum
     */
    public function setNoteEtu2($noteEtu2)
    {
        $this->noteEtu2 = $noteEtu2;

        return $this;
    }

    /**
     * Get noteEtu2
     *
     * @return integer 
     */
    public function getNoteEtu2()
    {
        return $this->noteEtu2;
    }

    /**
     * Set enseignant
     *
     * @param \IUTINFO\ActionsComBundle\Entity\Enseignant $enseignant
     * @return Forum
     */
    public function setEnseignant(\IUTINFO\ActionsComBundle\Entity\Enseignant $enseignant = null)
    {
        $this->enseignant = $enseignant;

        return $this;
    }

    /**
     * Get enseignant
     *
     * @return \IUTINFO\ActionsComBundle\Entity\Enseignant 
     */
    public function getEnseignant()
    {
        return $this->enseignant;
    }
}
